<?php

defined('PHPFOX') or exit('NO DICE!');

/**
 * 
 * Show store information in product detail page
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Anhbinu
 * @package 		Phpfox_Component
 * @version 		
 */
class Marketplace_Component_Block_Store_Info extends Phpfox_Component
{
    public function process(){
        
        $aListing = $this->getParam("aListing",null);
        if($aListing != null && isset($aListing["store_id"])){
            $iStoreId = $aListing["store_id"];
        }
        else{
            $iStoreId = $this->getParam("iStoreId",false);
            if(!$iStoreId)
                return false;
        }
        $aStore = Phpfox::getService("marketplace.store")->getForView($iStoreId);
        
        $this->template()->assign(array(
            "aStore" => $aStore,
            "aListing" => $aListing
        ));
    }
}